<!-- 左边图标跳转 页面 -->
<template>
	<view class="v-index-left">
		<view id="barTitle" :style="{ opacity: opacityStyle, height: heightSystemss+Number(50) + 'px' }"
			v-show="!hiddenModel">
			<text>软件开发者加盟</text>
		</view>
		<u-navbar :is-back="false">
			<view class="v-return flex-align-center" @click="toRe()" :style="{ padding: customBar + 'px' }" v-if="customBar">
				<image src="/static/retell.png"></image>
				<text>返回</text>
			</view>
		</u-navbar>
		
		<block v-if="leftText">
		
			<uv-parse :content="leftText" :selectable="true"></uv-parse>
			<!-- <rich-parser
				:html="leftText"
				domain="https://6874-html-foe72-1259071903.tcb.qcloud.la"
				lazy-load
				ref="article"
				selectable
				show-with-animation
				use-anchor
				class="alsdjaa"
			></rich-parser> -->
		</block>
		<block v-else>
			<view class="team flex-column ">
				<image src="/static/nodata.png"></image>
				<text class="text">空空如也 ~</text>
			</view>
		</block>
		<button class="v-call" @click="call()" v-if="mobile">点击联系我们</button>
	</view>
</template>

<script>
export default {
	data() {
		return {
			mobile: uni.getStorageSync('system').phone,
			leftText: uni.getStorageSync('system').enter_desc,
			heightSystemss: 0,
			customBar: 0,
			scrollTop: 0, //滚动距离
			hiddenModel: true, //显示影藏
			opacityStyle: 0,
		};
	},
	onLoad() {
		this.createdgetSystemInfo();
	},
	
	onPageScroll(ev) {
	
	
		if (ev.scrollTop > 10) {
			let opacity = ev.scrollTop / 140
	
			// this.opacityStyle = opacity > 1 ? 1 : opacity
			this.opacityStyle = 1
			this.hiddenModel = false
			// this.createdgetSystemInfo();
	
		} else {
			this.hiddenModel = true
		}
	},
	methods: {
		
		toRe() {
			this.$sun.navBack();
		},
		createdgetSystemInfo() {
			uni.getSystemInfo({
				success: e => {
					// 文章网址：https://blog.csdn.net/weixin_44510655/article/details/127131947
					this.heightSystemss = e.statusBarHeight;
					const custom = wx.getMenuButtonBoundingClientRect();
					this.customBar = ((custom.top - e.statusBarHeight) * 2 + custom.height) / 4;
				}
			});
		},
		// 拨打电话
		call() {
			this.$sun.phone(this.mobile);
		},
		// 开发者报名信息 表单填写
		async leftTables() {
			const result = await this.$http.post({
				url: this.$api.leftTable,
				data: {
					//  姓名
					name: uni.getStorageSync('user').nickname,
					// 电话号码
					mobile: uni.getStorageSync('mobile'),
					// 用户id
					uid: uni.getStorageSync('uid')
				}
			});
			if (result.code == 0) {
				this.tableList = result.data;
			}
		}
	}
};
</script>

<style lang="scss">
/deep/ button::after {
	border: none;
	margin: 0px;
	padding: 0px;
}

.v-index-left {
	#barTitle {
		position: fixed;
		width: 750rpx;
		top: 0;
		left: 0;
		background: #fff;
		color: #000000;
		text-align: center;
		font-weight: bold;
		z-index: 9999
	}
	
	#barTitle>text {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 20rpx
	}
	
	.v-return {
		display: flex;
		align-items: center;
		// background-color: #fff;
		// position: fixed;
		width: 100%;
		// padding:0 30rpx;
		z-index: 999;
		image {
			width: 36rpx;
			height: 36rpx;
			margin-right: 10rpx;
		}
		text {
			font-size: 32rpx;
		}
	}
	padding: 160rpx 0;
	.alsdjaa {
		margin: 30rpx;
	}
	.team {
		width: 750rpx;
		padding: 100rpx 0rpx;
		background-color: #ffffff;
		z-index: 99;
		image {
			width: 280rpx;
			height: 280rpx;
		}
		text {
			margin-top: 20rpx;
			font-size: 24rpx;
			color: gray;
		}
	}
	.v-call {
		background-image: linear-gradient(to bottom, #ffe66f, #ffe926);
		// color: #ffffff;
		width: 60%;
		position: fixed;
		bottom: 40rpx;
		left: 20%;
		border: none;
		border-radius: 500rpx;
		/* 		background-image: linear-gradient(to right , #FEFEE0,#FFF1AE,#FFAC53);
		// background-image: linear-gradient(to right bottom , #bae1ff,#499DFD,#0153FF);
		color: #fff;
		width: 90%;margin: 5%; */
	}
}
</style>
